package com.stylefeng.guns.rest.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.Version;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 用户返利购表
 * </p>
 *
 * @author ruiyifeng123
 * @since 2019-04-03
 */
@TableName("wz_user_rebate")
public class WzUserRebate extends Model<WzUserRebate> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "user_rebate_id", type = IdType.ID_WORKER)
    private Long userRebateId;
    /**
     * 礼券id
     */
    @TableField("coupon_id")
    private Long couponId;
    /**
     * 返利活动id
     */
    @TableField("map_rebate_id")
    private Long mapRebateId;
    /**
     * 用户编号
     */
    @TableField("user_code")
    private Long userCode;
    /**
     * 优惠信息
     */
    private String benefit;
    /**
     * 商户名称
     */
    @TableField("merchant_name")
    private String merchantName;
    /**
     * 图片
     */
    private String pic;
    /**
     * 昵称
     */
    @TableField("nick_name")
    private String nickName;
    /**
     * 头像
     */
    @TableField("avatar_url")
    private String avatarUrl;
    /**
     * 购买数量
     */
    private Integer quantity;
    /**
     * 状态:1-进行中；2-已结束；
     */
    private Integer status;
    /**
     * 支付时间
     */
    @TableField("pay_time")
    private Date payTime;
    /**
     * 分享人数
     */
    @TableField("share_number")
    private Integer shareNumber;
    /**
     * 最多返利人数
     */
    @TableField("need_share_number")
    private Integer needShareNumber;
    /**
     * 原价金额
     */
    private Integer price;
    /**
     * 返利价
     */
    @TableField("rebate_price")
    private Integer rebatePrice;
    /**
     * 返利金额
     */
    @TableField("rebate_amount")
    private Integer rebateAmount;
    /**
     * 结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 用户收货地址
     */
    @TableField("user_info_id")
    private String userInfoId;
    /**
     * 购买用户id：微信-openid；支付宝-buyerId
     */
    @TableField("buyer_id")
    private String buyerId;
    /**
     * 支付方式:1-alipay;2-weixin;3-wz
     */
    @TableField("pay_method")
    private Integer payMethod;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    @Version
    private Integer version;


    public Long getUserRebateId() {
        return userRebateId;
    }

    public void setUserRebateId(Long userRebateId) {
        this.userRebateId = userRebateId;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public Long getMapRebateId() {
        return mapRebateId;
    }

    public void setMapRebateId(Long mapRebateId) {
        this.mapRebateId = mapRebateId;
    }

    public Long getUserCode() {
        return userCode;
    }

    public void setUserCode(Long userCode) {
        this.userCode = userCode;
    }

    public String getBenefit() {
        return benefit;
    }

    public void setBenefit(String benefit) {
        this.benefit = benefit;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Integer getShareNumber() {
        return shareNumber;
    }

    public void setShareNumber(Integer shareNumber) {
        this.shareNumber = shareNumber;
    }

    public Integer getNeedShareNumber() {
        return needShareNumber;
    }

    public void setNeedShareNumber(Integer needShareNumber) {
        this.needShareNumber = needShareNumber;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getRebatePrice() {
        return rebatePrice;
    }

    public void setRebatePrice(Integer rebatePrice) {
        this.rebatePrice = rebatePrice;
    }

    public Integer getRebateAmount() {
        return rebateAmount;
    }

    public void setRebateAmount(Integer rebateAmount) {
        this.rebateAmount = rebateAmount;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getUserInfoId() {
        return userInfoId;
    }

    public void setUserInfoId(String userInfoId) {
        this.userInfoId = userInfoId;
    }

    public String getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(String buyerId) {
        this.buyerId = buyerId;
    }

    public Integer getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(Integer payMethod) {
        this.payMethod = payMethod;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    protected Serializable pkVal() {
        return this.userRebateId;
    }

    @Override
    public String toString() {
        return "WzUserRebate{" +
        "userRebateId=" + userRebateId +
        ", couponId=" + couponId +
        ", mapRebateId=" + mapRebateId +
        ", userCode=" + userCode +
        ", benefit=" + benefit +
        ", merchantName=" + merchantName +
        ", pic=" + pic +
        ", nickName=" + nickName +
        ", avatarUrl=" + avatarUrl +
        ", quantity=" + quantity +
        ", status=" + status +
        ", payTime=" + payTime +
        ", shareNumber=" + shareNumber +
        ", needShareNumber=" + needShareNumber +
        ", price=" + price +
        ", rebatePrice=" + rebatePrice +
        ", rebateAmount=" + rebateAmount +
        ", endTime=" + endTime +
        ", userInfoId=" + userInfoId +
        ", buyerId=" + buyerId +
        ", payMethod=" + payMethod +
        ", createTime=" + createTime +
        ", version=" + version +
        "}";
    }
}
